<div class="col-md-8 col-md-offset-2">
	<h3 class="header smaller lighter blue">
		<a href="/#/cluster_list">Cluster List</a>
        <span> > </span>
    	<a href="/#/cluster_list?clusterName={{clusterName}}">{{clusterName}}</a>
    	<span> > </span>
    	<span>数据中心</span>
    </h3>
    
    <div class="panel panel-primary">
        <header class="panel-heading">
            已绑定
        </header>
        <table class="table table-bordered table-hover">
            <thead class="thin-border-bottom">
            <tr>
                <th>
                    数据中心
                </th>
                <th>
                    描述
                </th>
                <th>
                    状态
                </th>
                <th>
                    操作
                </th>
            </tr>
            </thead>
            <tbody>
            <tr ng-repeat="dc in dcs">
                <td ng-bind="dc.dcName"></td>
                <td ng-bind="dc.dcDescription"></td>
                <td>
					<span class="label label-info arrowed-right arrowed-in"
						ng-if="isActiveDc(dc.id)">主数据中心</span>
					<span class="label label-warning label-sm"
						ng-if="notActiveDc(dc.id)">从数据中心</span>
                    <span ng-if="isCrossDc()">-</span>
                <td>
                    <a ng-if="notActiveDc(dc.id)"
                       ng-click="preUnbindDc(dc)">解除绑定</a>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
</div>

<div class="col-md-8 col-md-offset-2">
    <div class="panel panel-primary">
        <header class="panel-heading">
            未绑定
        </header>
        <table class="table table-bordered table-hover">
            <thead>
            <tr>
                <th>
                    数据中心
                </th>
                <th>
                    描述
                </th>
                <th>
                    操作
                </th>
            </tr>
            </thead>
            <tbody>
            <tr ng-repeat="dc in unattached_dc">
                <td ng-bind="dc.dcName"></td>
                <td ng-bind="dc.dcDescription"></td>
                <td>
                    <a ng-click="preBindDc(dc)">绑定</a>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
</div>


<xpipeconfirmdialog xpipe-dialog-id="'unbindDcConfirm'" xpipe-title="'解绑数据中心'"
                    xpipe-detail="'您确定要将数据中心 (' + toUnbindDc.dcName + ')从当前cluster中解绑吗?'"
                    xpipe-show-cancel-btn="true" xpipe-confirm="unbindDc"></xpipeconfirmdialog>

<xpipeconfirmdialog xpipe-dialog-id="'bindDcConfirm'" xpipe-title="'绑定数据中心'"
                    xpipe-detail="'您确定要将数据中心(' + toBindDc.dcName +')绑定到当前cluster吗?(默认是DRMaster机房)'"
                    xpipe-show-cancel-btn="true" xpipe-confirm="bindDc"></xpipeconfirmdialog>



